def seven_clap_game():
    """逢7拍手游戏：输出100以内需要拍手的数字"""
    print("===== 逢7拍手游戏 =====")
    clap_nums = []
    for num in range(1, 101):
        if num % 7 == 0 or '7' in str(num):
            clap_nums.append(num)
    print("100以内需要拍手的数字：", clap_nums)


def print_gobang_board(size):
    """打印指定大小的五子棋棋盘"""
    print(f"\n===== {size}x{size} 五子棋棋盘 =====")
    for i in range(size):
        # 打印横线
        print("+---" * size + "+")
        # 打印竖线
        print("|   " * size + "|")
    # 打印最后
    print("+---" * size + "+")


def main():
    while True:
        print("\n请选择功能：")
        print("1. 运行逢7拍手游戏")
        print("2. 打印五子棋棋盘")
        print("0. 退出程序")
        choice = input("请输入选项（0-2）：")
        
        if choice == "1":
            seven_clap_game()
        elif choice == "2":
            try:
                size = int(input("请输入棋盘大小（如15）："))
                print_gobang_board(size)
            except ValueError:
                print("请输入有效的整数！")
        elif choice == "0":
            print("程序已退出，再见！")
            break
        else:
            print("无效选项，请重新输入！")


if __name__ == "__main__":
    main()